<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>创建合同订单</title>
    <%@ include file="/WEB-INF/views/include/head.jsp"%>
    <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
    <script src="${ctxStatic}/js/layer.js"></script>
    <script src="${ctxStatic}/js/style.js"></script>
    <script src="${ctxStatic}/dateCalendar/WdatePicker.js"></script>
    <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
    <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
    <script type="text/javascript">
    $(document).ready(function(){
    	if ($("#auditStatus").val() == 'AUDIT_STATUS-AUDIT_20') {
    		$("#showHtml").addClass("showHtml");
    		$("#showHtml").find("input,select").attr("disabled","disabled");
		}
    	var form = $("#inputForm");  
        form.validate();//验证指定的表单
    	$("#ognizationID").select2();
    	$("#orderType").select2();
    	$("#orderStatus").select2();
    	$("#contractCurrency").select2();
    	$("#transportMode").select2();
    	$("#balanceMode").select2();
    	//$("select").select2();
    	if ($("#id").val()!=null&&$("#id").val()!='') {
    		$("#pFileHtml").html("");
		}
   		$("#okButton").click(function(){
    		if (form.valid()) {//如果表单验证成功，则进行提交。  
    			var inputlength = $(".indentPrice").length;
    		if (inputlength>0) {
    	    	for (var i = 0; i < inputlength; i++) {
    	    		if ($(".indentPrice")[i].value==""||$(".indentPrice")[i].value==null) {
    	    			tipParent("单价不能为空！");
    					return false;
    				}
    			}
			}
    		$("#showHtml").addClass("showHtml");
            $("#okHead").show();
            $("#createHead").hide();  
            return false;
          	}
     	});
    });
    
    /* 保存创建/编辑信息 */
    function saveForm(){
    	$("#showHtml").find("input,select").removeAttr("disabled");
    	var params = $("#inputForm").serialize();
    	$.post("${ctx}/bigcargo/order/save",params,function(result){
    		/* 弹出提示框,刷新父页面,关闭当前页面 */
    		tipParent(result.message);
    		 window.parent.frames[0].searchListForm();
    		closeWin();
    	},'json');
    }
    
    
   /*  货币联动  */
    function currency(){
    	var currencyCD = $("#contractCurrency").val();
    	if (currencyCD=="QUOTATION_CURRENCY-CNY") {
    		$("#contractExchangeRate").val(1);
    		formatMoney($("#contractExchangeRate"),3);
    		exchangeRate();
		}
    	var currencyName =  $('#contractCurrency  option:selected').text();
    	if (currencyCD =="") {
    		currencyName = "";
		}
    	var count = document.getElementsByName("statusIndex");
    	for (var i = 0; i < count.length; i++) {
    	document.getElementsByName("indentCurrencyName")[i].value = currencyName;
    	document.getElementsByName("bigcargoOrderList["+i+"].indentCurrencyCD")[0].value = currencyCD;
		}
    	
    }
    
    /* 删除   */
	 
	 function deleteCurrentRow(obj){ 
		 
		 if (confirm("<spring:message code="quotation_create_areYouSure"/>")) {
           var tr=obj.parentNode.parentNode.parentNode;  
           var tbody=tr.parentNode 
           tbody.removeChild(tr);            
			
		}
	 }
    /* 选择款式窗口 */
    function styleWin(){
    	var ognizationName = $('#ognizationID  option:selected').text();
    	if(ognizationName=="<spring:message code="contract_edit_please" />"){
    		ognizationName="";
    	}
    	popup('900px','584px','${ctx}/quotation/message/createStyle?frameFlg=3&styleCustomerName='+ognizationName);
    }
	 
    function changeSelect(t) {
    	$("#ognizationID").val(t);
    	$("#custoID").val(t);
		$("#ognizationID").select2();
	}
    /* 更换客户  清空款式 */
    function newCostomer(){
    	if ($("#custoID").val()!=null&&$("#custoID").val()!=""&&$("#custoID").val()!="0") {
    		var newID = $("#ognizationID option:selected").val();
    		var oldID = $("#custoID").val();
    		if (confirm("<spring:message code="contract_edit_changeCustomerSure" />")) {
    			$("#sListHtml").html("");
    			$("#custoID").val(newID);
			}else{
				$("#ognizationID").val(oldID);
				$("#ognizationID").select2();
			}
		}
    }
    
    /* 汇率联动 */
    function exchangeRate(){
    	var exchangeRate = $("#contractExchangeRate").val();
    	exchangeRate = exchangeRate.replace(/,/,"");
    	var count = document.getElementsByName("statusIndex");
    	for (var i = 0; i < count.length; i++) {
    	document.getElementsByName("bigcargoOrderList["+i+"].indentExchangeRate")[0].value = exchangeRate;
    	formatMoney($(document.getElementsByName("bigcargoOrderList["+i+"].indentExchangeRate")[0]),3);
    	myMath(obj,i);
		}
    	
    }
   /* 添加款式   */
    function strHtml(t1,t2,t3,t4,t5) {
    $.post("${ctx}/bigcargo/order/findColorQuantity?styleID="+t1,"",function(result){
    	var statusIndex = document.getElementsByName("statusIndex");
    	var newIndex ;
    	if (statusIndex.length==0) {
    		newIndex = 0;
		}else{
			
    		var statusNum = $("tbody").find("tr.table-TR")[statusIndex.length-1].children[10].value;
			newIndex = parseInt(statusNum) + parseInt(1);
			
		}
    	
    	html="";
    	html += "<tr class='table-TR'><td><p class='tab-ddcz'><img src='${ctxStatic}/images/del_icon.png' style='width: 30px' onclick='deleteCurrentRow(this);'></p></td><td><p class='tab-ddkstp'><img src='";
    	if (t2!=null&&t2!="") {
			html += t2;
		}else{
			html += "${ctxStatic}/images/pic-none.jpg";
			
		}
    	html += "'></p></td><td><p class='width-150px'>"+t3+"<br>"+t4+"</p></td>";
    	html += "<td><p class='tab-ddlb'>"+t5+"</p></td>";
    	html += "<td><input name='indentCurrencyName' class='indentCurrencyName tab-ddhb' readonly='readonly' value=''/></td>";
    	html += "<td><input name='bigcargoOrderList["+newIndex+"].indentExchangeRate' class='tab-ddhl' readonly='readonly' value='<fmt:formatNumber value='' pattern='#,##0.00#'/>' onchange='myMath(this,-1);'/></td>";
    	html += "<td><input name='bigcargoOrderList["+newIndex+"].indentPrice' class='tab-dddj indentPrice' value='<fmt:formatNumber value='' pattern='#,##0.00#'/>' onblur='formatMoney(this,2);' onfocus='unFormat(this)' onchange='myMath(this,-1);'/></td>";
    	html += "<td onclick='popupCQ(this,"+t1+");'><input name='bigcargoOrderList["+newIndex+"].indentQuantity' class='tab-ddsl linkBox' value='<fmt:formatNumber value='0' pattern='#,##0'/>' onchange='myMath(this,-1);'/></td>";
    	html += "<td><input name='bigcargoOrderList["+newIndex+"].indentAmount' class='tab-ddje' readonly='readonly' value='<fmt:formatNumber value='0' pattern='#,##0.00#'/>'/></td>";
    	html += "<td id='hiddenTD' class='none'>";
    	html += "<table id='hiddenTable' cellpadding='0' class='none tableBody'>";
    	html += "</table></td>'";
    	html += "<input type='hidden' name='statusIndex' value='"+newIndex+"'/><input type='hidden' name='bigcargoOrderList["+newIndex+"].styleID' value='"+t1+"'/><input type='hidden' name='bigcargoOrderList["+newIndex+"].indentCurrencyCD' value='"+t5+"'/></tr>";
		$("#sListHtml").append(html);
		currency();
		exchangeRate();
    },'json');
    }
    /* 弹出设置颜色数量窗口 */
    function popupCQ(t,tid) {
    	
    	var tr = t.parentNode;
    	var index = tr.rowIndex;
    	var realIndex = $("tbody").find("tr.table-TR")[index].children[10].value;
    	popup("900px","584px","${ctx}/bigcargo/order/setColorQuantity?index="+index+"&styleID="+tid+"&realIndex="+realIndex+"&status="+$("#auditStatus").val());
	}
    /* 计算合计金额 */
    function myMath(obj,i) {
    	var index;
    	if (i=="-1") {
    	var tr = obj.parentNode.parentNode;
    		index = tr.rowIndex;
			
		}else{
			index = i;
		}
		var exchangeRate = $("#contractExchangeRate").val();
		var price = $("tbody").find("tr.table-TR")[index].children[6].firstChild.value;
		var quantity = $("tbody").find("tr.table-TR")[index].children[7].firstChild.value;
		exchangeRate = exchangeRate.replace(/,/g, "");
		price = price.replace(/,/g, "");
		quantity = quantity.replace(/,/g, "");
		if(exchangeRate==null||exchangeRate==""){
			exchangeRate = 0;
    	}
		if(price==null||price==""){
			price = 0;
    	}
		if(quantity==null||quantity==""){
			quantity = 0;
    	}
		var result = parseFloat(exchangeRate)*parseFloat(price)*parseFloat(quantity);
		$("tbody").find("tr.table-TR")[index].children[8].firstChild.value = result;
		formatMoney($("tbody").find("tr.table-TR")[index].children[8].firstChild,2);
	}
    
    
    function setUpload(uploadFileName,filePath) {
    	$("#pFileHtml").html("");
    	$("#superLink").attr("href",filePath+uploadFileName);
    	$("#superLink").html(uploadFileName);
    	$("#uploadFileName").val(uploadFileName);
		$("#filePath").val(filePath);
	}
    
    
    </script>
    <style type="text/css">
    .linkBox{
	color:#0a6dca;
	cursor:pointer;
	text-decoration:underline;
	}
	
    </style>
</head>
<form id="inputForm">
<body>   
<c:set value="<%=ResourcesUtil.getConfig(\"reserver_meterial_ok\")%>" var="auditOK"/>
<input type="hidden" id="auditStatus" name="status" value="${bigcargoOrder.status }"/>
<div id="createHead" class="layerHeader clearfix">
<c:choose>
	   <c:when test="${bigcargoOrder.id!=null && bigcargoOrder.id!=''}">
	    <!-- 编辑 --> 
			<p class="headerTitle"><spring:message code="contract_edit_editOrder" /></p>
       </c:when>
       <c:otherwise>
        <!-- 创建 --> 
            <p class="headerTitle"><spring:message code="contract_edit_createOrder" /></p>
       </c:otherwise>
    </c:choose>
	
    <div class="headerButton clearfix">
    <c:if test="${bigcargoOrder.status ne auditOK }">
        <button type="button" class="btn-js" onclick="popup('500px','324px','${ctx}/bigcargo/style/uploadFileMaterial?uploadFlg=1');"><spring:message code="contract_edit_uploadOrder" /></button>
        <button type="button" onclick="styleWin();"><spring:message code="contract_edit_createStyle" /></button>
    </c:if>
        <button type="button" id="okButton"><spring:message code="btn_ok"/></button>
        <button type="button" onclick="closeWin()"><spring:message code="btn_cancle"/></button>
    </div>
</div>
<!-- 确认画面头部 -->
<div id="okHead" class="layerHeader clearfix" style="display: none;">	      
             <p class="headerTitle"><spring:message code="warehouse_edit_ok" /></p>    
    <div class="headerButton clearfix">
    <c:choose>
	   <c:when test="${bigcargoOrder.id!=null && bigcargoOrder.id!=''}">
	    <!-- 编辑 保存 --> 
	    <shiro:hasPermission name="bigcargo:order:edit">
			<button type="button" onclick="saveForm();"><spring:message code="common_save" /></button>
			</shiro:hasPermission>
       </c:when>
       <c:otherwise>
        <!-- 创建 保存 --> 
        <shiro:hasPermission name="bigcargo:order:edit">
            <button type="button" onclick="saveForm();"><spring:message code="common_save" /></button>
            </shiro:hasPermission>
       </c:otherwise>
     </c:choose>
        <!-- 取消 -->
          <button type="button" onclick="closeWin()"><spring:message code="btn_cancle"/></button>
    </div>
</div>
<div id="showHtml" class="smOrderBox">
	<input type="hidden" id="id" name="id" value="${bigcargoOrder.id}">
	<input type="hidden" id="contractNO" name="contractNO" value="${bigcargoOrder.contractNO}">
    <div class="items clearfix">
    <div class="col-33 clearfix haveToBox">
        <!-- 合同号  -->
            <p class="tit"><spring:message code="contract_edit_customerStyle" /></p>
            <input name="customerContractNO" style="width: 170px"  value="${bigcargoOrder.customerContractNO }" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_customerStyle" />">
            <p class="haveTo">*</p>
        </div>
        <div class="col-33 clearfix haveToBox">
        <!-- 订单状态  -->
            <p class="tit"><spring:message code="contract_edit_orderStatus" /></p>
             <c:set value="CONTRACT_STAUS" var="orderStatusList"/>
            <select id="orderStatus" name="orderStatus" style="width: 170px" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_orderStatus" />">
            <option value=""><spring:message code="contract_edit_please" /></option>
            <c:forEach items="${fns:getDictList(orderStatusList)}" var="status">
            <option value="${status.itemCode}-${status.itemValue}" <c:if test="${fn:split(bigcargoOrder.orderStatus,'-')[1] eq status.itemValue }">selected="selected"</c:if>>${status.itemName}</option>
            </c:forEach>
            </select>
            <p class="haveTo">*</p>
        </div>
        <div class="col-33 clearfix haveToBox">
        <!-- 订单类别 -->
            <p class="tit"><spring:message code="contract_edit_orderType" /></p>
            <c:set value="STYLE_SOURCE-STYLE_SOURCE_20" var="orderType"/>
            <label>${fns:getDictName(orderType) }</label>
            <input type="hidden" name="orderTypeCD" value="${orderType }"/>
            <%-- <select id="orderType" name="orderTypeCD" style="width: 170px" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_orderType" />">
            <option value=""><spring:message code="contract_edit_please" /></option>
            <c:forEach items="${fns:getDictList(orderTypeList)}" var="orderType">
            <option value="${orderType.itemCode}-${orderType.itemValue}" <c:if test="${fn:split(bigcargoOrder.orderTypeCD,'-')[1] eq orderType.itemValue }">selected="selected"</c:if>>${orderType.itemName}</option>
            </c:forEach>
            </select> --%>
            <p class="haveTo">*</p>
        </div>
    </div>
    <div class="items clearfix">
        <div class="col-33 clearfix haveToBox">
        <!-- 客户名称  -->
            <p class="tit"><spring:message code="contract_edit_customerName" /></p>
            <select id="ognizationID" name="ognizationID" style="width: 170px" onchange="newCostomer();" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_customerName" />">
            <option value=""><spring:message code="contract_edit_please" /></option>
            <c:forEach items="${bigcargoOrder.orderStyleList }" var="customer">
            <option value="${customer.ognizationID }" <c:if test="${bigcargoOrder.ognizationID eq customer.ognizationID }">selected="selected"</c:if>>${customer.ognizationName }</option>
            </c:forEach>
            </select>
            <input type="hidden" id="custoID" value="${bigcargoOrder.ognizationID}"/>
            <p class="haveTo">*</p>
        </div>
        <div class="col-33 clearfix haveToBox">
        <!-- 运输方式  -->
            <p class="tit"><spring:message code="contract_edit_transportMode" /></p>
             <c:set value="TRANSPORT_MODE" var="transportMode"/>
            <select id="transportMode" name="contractTransportMode" style="width: 170px" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_transportMode" />">
            	<option value=""><spring:message code="contract_edit_please" /></option>
            <c:forEach items="${fns:getDictList(transportMode)}" var="transport">
            	<option value="${transport.itemCode}-${transport.itemValue}" <c:if test="${fn:split(bigcargoOrder.contractTransportMode,'-')[1] eq transport.itemValue }">selected="selected"</c:if>>${transport.itemName}</option>
            </c:forEach>
            </select>
            <p class="haveTo">*</p>
        </div>
        <div class="col-33 clearfix haveToBox">
        <!-- 结算方式  -->
            <p class="tit"><spring:message code="contract_edit_balanceMode" /></p>
            <c:set value="BALANCE_MODE" var="balanceMode"/>
            <select id="balanceMode" name="contractBalanceMode" style="width: 170px" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_balanceMode" />">
            	<option value=""><spring:message code="contract_edit_please" /></option>
            <c:forEach items="${fns:getDictList(balanceMode)}" var="balance">
            	<option value="${balance.itemCode}-${balance.itemValue}" <c:if test="${fn:split(bigcargoOrder.contractBalanceMode,'-')[1] eq balance.itemValue }">selected="selected"</c:if>>${balance.itemName}</option>
            </c:forEach>
            </select>
            <p class="haveTo">*</p>
        </div>
    </div>
    <div class="items clearfix" >        	
                <div class="col-33 clearfix haveToBox">
                <!-- 签订日期  -->
                    <p class="tit"><spring:message code="contract_edit_issueDate" /></p>
                    <input type="text" id="contractIssueDate" style="width: 170px" name="contractIssueDate" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_issueDate" />" onblur="CheckDate(this);" value="<fmt:formatDate value="${bigcargoOrder.contractIssueDate }" pattern="yyyy-MM-dd" />">
                    <p class="haveTo">*</p>
                </div>
                
                <div class="col-33 clearfix haveToBox">
                <!-- 交货日期  -->
                    <p class="tit"><spring:message code="contract_edit_deliveryDate" /></p>
                    <input type="text" id="contractDeliveryDate" style="width: 170px" name="contractDeliveryDate" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_deliveryDate" />" onblur="CheckDate(this);" value="<fmt:formatDate value="${bigcargoOrder.contractDeliveryDate }" pattern="yyyy-MM-dd" />">
                    <p class="haveTo">*</p>
                </div>
                <div class="col-33 clearfix haveToBox">
                <!-- 最迟船期  -->
                    <p class="tit"><spring:message code="contract_edit_lastShipDate" /></p>
                    <input type="text" id="contractLastShipDate" style="width: 170px" name="contractLastShipDate" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_lastShipDate" />" onblur="CheckDate(this);" value="<fmt:formatDate value="${bigcargoOrder.contractLastShipDate }" pattern="yyyy-MM-dd" />">
                    <p class="haveTo">*</p>
                </div>
            </div>
    
            <div class="items clearfix haveToBox">        	
                <div class="col-33 clearfix">
                <!-- 货币  -->
                    <p class="tit"><spring:message code="contract_edit_currency" /></p>
                    <c:set value="QUOTATION_CURRENCY" var="contractCurrencyList"/>
            		<select id="contractCurrency" name="contractCurrencyCD" style="width: 170px" onchange="currency();" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_currency" />">
            		<option value=""><spring:message code="contract_edit_please" /></option>
           			<c:forEach items="${fns:getDictList(contractCurrencyList)}" var="currency">
            		<option value="${currency.itemCode}-${currency.itemValue}" <c:if test="${fn:split(bigcargoOrder.contractCurrencyCD,'-')[1] eq currency.itemValue }">selected="selected"</c:if>>${currency.itemName}</option>
            		</c:forEach>
           			</select>
           			<p class="haveTo">*</p>
                </div>
                <div class="col-33 clearfix haveToBox">
                <!-- 汇率  -->
                    <p class="tit"><spring:message code="contract_edit_exchangeRate" /></p>
                     <input id="contractExchangeRate" style="width: 170px" name="contractExchangeRate" value="<fmt:formatNumber value="${bigcargoOrder.contractExchangeRate }" pattern="#0.000#"/>" onblur="formatMoney(this,3);" onchange="exchangeRate();" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_exchangeRate" />">
                	<p class="haveTo">*</p>
                </div>
                <div class="col-33 clearfix">
                <!-- 合同文件  -->
            		<p class="tit"><spring:message code="contract_edit_file" /></p>
            		<p id="pFileHtml" style="color: black;"><spring:message code="contract_edit_file_pleaseChooseFile" /></p>
            		<a id="superLink" href="${bigcargoOrder.filePath }${bigcargoOrder.uploadFileName }">${bigcargoOrder.uploadFileName }</a>
            		<input type="hidden" id="filePath" name="filePath" value="${bigcargoOrder.filePath }">
            		<input type="hidden" id="uploadFileName" name="uploadFileName" style="width:230px;" value="${bigcargoOrder.uploadFileName }" readonly="readonly">
        		</div>
            </div>
            <div class="items clearfix showHtml">
                <div class="col-33 items clearfix">
                <!-- 创建人 -->
                    <p class="tit"><spring:message code="contract_edit_creator" /></p>
                    <input  value="${bigcargoOrder.createBy.firstName }${bigcargoOrder.createBy.lastName }" disabled="disabled">
                </div>
                <div class="col-33 items clearfix">
                <!-- 登录日期 -->
                    <p class="tit"><spring:message code="contract_edit_date" /></p>
                    <c:if test="${bigcargoOrder.id!=null && bigcargoOrder.id!=''}">
                    <input name="createDate" value="<fmt:formatDate value="${bigcargoOrder.createDate }" pattern="yyyy-MM-dd" />" disabled="disabled">
                    </c:if>
                    <c:if test="${bigcargoOrder.id==null || bigcargoOrder.id==''}">
                    <input name="createDate" value="${fns:getDate('yyyy-MM-dd')}" disabled="disabled">
                    </c:if>
                </div>
        		<div class="col-33 clearfix">
        		<!-- 备注 -->
            		<p class="tit"><spring:message code="contract_edit_remark" /></p>
            		<textarea name="remark" style="width:230px;height: 40px">${bigcargoOrder.remark }</textarea>
        		</div>
           
    </div>
</div>
<div class="tableArea">
    <div class="tableScroll tableScrollSm">
        <table cellpadding="0" class="tableHead">
            <thead>
            <tr>
            	<th><p class="tab-ddcz"><spring:message code="contract_edit_operation" /></p></th>
                <th><p class="tab-ddkstp"><spring:message code="contract_edit_styleImage" /></p></th>
                <th><p class="width-150px"><spring:message code="contract_edit_styleNoName" /></p></th>
                <th><p class="tab-ddlb"><spring:message code="contract_edit_styleType" /></p></th>
                <!-- <th><p class="tab-ddml">面料</p></th> -->
                <th><p class="tab-ddhb"><spring:message code="contract_edit_styleCurrency" /></p></th>
                <th><p class="tab-ddhl"><spring:message code="contract_edit_styleExchangeRate" /></p></th>
                <th><p class="tab-dddj"><spring:message code="contract_edit_stylePrice" /></p></th>
                <th><p class="tab-ddsl"><spring:message code="contract_edit_styleSize" /></p></th>
                <th><p class="tab-ddje"><spring:message code="contract_edit_styleAmount" /></p></th>
                
            </tr>
            </thead>
        </table>
        <table cellpadding="0" class="tableBody" id="parentTable">
            <tbody id="sListHtml">
            <c:forEach items="${bigcargoOrder.bigcargoOrderList }" var="style" varStatus="status">
            <tr class="table-TR">
            	<td><p class="tab-ddcz"><c:if test="${bigcargoOrder.status ne auditOK }"><img src='${ctxStatic}/images/del_icon.png' style="width: 25px" onclick='deleteCurrentRow(this)'></c:if></p></td>
                <td><p class="tab-ddkstp"><img style="width: 65px;height: 65px" src="<c:if test="${style.styleFile!=null&&style.styleFile!='' }">${style.styleFile }</c:if><c:if test="${style.styleFile==null||style.styleFile=='' }">${ctxStatic}/images/pic-none.jpg</c:if>"></p></td>
                <td><p class="width-150px">${style.styleCustomerNo }<br>${style.styleNameCN }</p></td>
                <td><p class="tab-ddlb">${fns:getDictName(style.styleCatgoryCD) }</p></td>
                <%-- <td><p class="tab-ddml">${style.materialCode }<br>${style.materialName }</p></td> --%>
                <td><input name="indentCurrencyName" class="indentCurrencyName tab-ddhb" readonly="readonly" value="${fns:getDictName(style.indentCurrencyCD) }"/></td>
                <td><input id="indentExchangeRate" name="bigcargoOrderList[${status.index }].indentExchangeRate" class="tab-ddhl" readonly="readonly" value="<fmt:formatNumber value="${style.indentExchangeRate }" pattern="#,##0.000#"/>" onchange="myMath(this,-1);"/></td>
                <td><input id="indentPrice" name="bigcargoOrderList[${status.index }].indentPrice" class="tab-dddj indentPrice" value="<fmt:formatNumber value="${style.indentPrice }" pattern="#,##0.00#"/>" onblur="formatMoney(this,2);" onfocus="unFormat(this)" onchange="myMath(this,-1);"/></td>
                <td onclick="popupCQ(this,${style.styleID });"><input id="indentQuantity" readonly="readonly" name="bigcargoOrderList[${status.index }].indentQuantity" class="tab-ddsl linkBox" value="<fmt:formatNumber value="${style.indentQuantity }" pattern="#,##0"/>" onchange="myMath(this,-1);"/></td>
                <td><input id="indentAmount" name="bigcargoOrderList[${status.index }].indentAmount" class="tab-ddje" readonly="readonly" value="<fmt:formatNumber value="${style.indentAmount }" pattern="#,##0.00#"/>"/></td>
                <td id="hiddenTD" class="none"><table id="hiddenTable" cellpadding="0" class="none tableBody">
                <c:forEach items="${style.sizeColorQuantity.sizeColorQuantityList }" var="size" varStatus="statusSize">
                	<tr>
                	<td class="tab-NO"><img src="${ctxStatic}/images/del_icon.png" height="25" width="25"  onclick="deleteCurrentRow(this)"></td>
                	<td class="tab-kscm"><select style="width: 240px;" onchange="selectChange(this)" name="bigcargoOrderList[${status.index }].sizeColorQuantity.sizeColorQuantityList[${statusSize.index }].indentSizeCD"><c:forEach items="${style.styleFit.styleFitList }" var="sizeList"><option value="${sizeList.styleSizeCd }" <c:if test="${sizeList.styleSizeCd==size.indentSizeCD }">selected="selected"</c:if>>${fns:getDictName(sizeList.styleSizeCd) }</option></c:forEach></select></td>
                	<td class="tab-ksys"><input class="inputColor" type="text"  name="bigcargoOrderList[${status.index }].sizeColorQuantity.sizeColorQuantityList[${statusSize.index }].indentColorName" value="${size.indentColorName }" onblur="changeValue(this,this.value);"/></td>
                	<td class="tab-kssl"><input class="inputNumber" type="text" name="bigcargoOrderList[${status.index }].sizeColorQuantity.sizeColorQuantityList[${statusSize.index }].indentNumber" value="<fmt:formatNumber value="${size.indentNumber }" pattern="#,##0"/>" onblur="formatNumber(this);changeValue(this,this.value);" onfocus="unFormat(this)"/></td>
                	</tr>
                </c:forEach>
                </table></td>
                <input type="hidden" class="statusIndex" name="statusIndex" value="${status.index }"/>
                <input type="hidden" name="bigcargoOrderList[${status.index }].indentID" value="${style.indentID }"/>
                <input type="hidden" name="bigcargoOrderList[${status.index }].styleID" value="${style.styleID }"/>
                <input type="hidden" name="bigcargoOrderList[${status.index }].indentCurrencyCD" value="${style.indentCurrencyCD }"/>
            </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>
</form>
<script>
	window.onload = function(){
	$('.tableScrollSm').css('height','375px')
	$('td input').each(function(){
		var tdH = $(this).parents('td').height()
		$(this).css('height',tdH)
		});
	};
	var tableW = $('.tableHead').outerWidth();
	$('.tableScroll').css('width',tableW + 18 + 'px');

</script>
</body>
</html>
